package t;

import org.apache.poi.ss.formula.functions.T;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;

public class OptionTest {

    public static void main(String[] args) {
        String[] aa = {"aa", "bb", "cc"};
        Tbean b = new Tbean();
        b.setStrings(aa);

        System.out.println(Arrays.stream(Optional.ofNullable(b).map(Tbean::getStrings).get()).findFirst().get());


    }

}

class Tbean {
    String [] strings;

    public String[] getStrings() {
        return strings;
    }

    public void setStrings(String[] strings) {
        this.strings = strings;
    }
}
